Make manual resizing smoother by processing events after changing the
authorRichard Hult <richard@imendio.com>
Thu, 20 Dec 2007 13:25:37 +0000 (13:25 +0000)
committerRichard Hult <rhult@src.gnome.org>
Thu, 20 Dec 2007 13:25:37 +0000 (13:25 +0000)
2007-12-20  Richard Hult  <richard@imendio.com>

* gdk/quartz/GdkQuartzWindow.c:
* gdk/quartz/GdkQuartzWindow.h: Make manual resizing smoother by
processing events after changing the size.

svn path=/trunk/; revision=19206

ChangeLog
gdk/quartz/GdkQuartzWindow.c
gdk/quartz/GdkQuartzWindow.h

index 095131358316dac6f4d388fdf3a0ddfebc49c2c3..703135ea88adade12c1697ee9bdc4cc86452330b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-12-20  Richard Hult  <richard@imendio.com>
+
+       * gdk/quartz/GdkQuartzWindow.c:
+       * gdk/quartz/GdkQuartzWindow.h: Make manual resizing smoother by
+       processing events after changing the size.
+
 2007-12-20  Richard Hult  <richard@imendio.com>
 
        * modules/other/gail/gailwindow.c: (gail_window_get_mdi_zorder):
index 220531604f40d6520bc88dcf64d8fcc674cc2b8e..b5c751d4430e4a04d04dc2aa15127a4d5ea2b696 100644 (file)
   float dx, dy;
   NSSize min_size;
 
-  if (!inManualResize)
+  if (!inManualResize || inTrackManualResize)
     return NO;
 
+  inTrackManualResize = YES;
+
   currentLocation = [self convertBaseToScreen:[self mouseLocationOutsideOfEventStream]];
   currentLocation.x -= initialResizeFrame.origin.x;
   currentLocation.y -= initialResizeFrame.origin.y;
 
   [self setFrame:newFrame display:YES];
 
+  /* Let the resizing be handled by GTK+. */
+  if (g_main_context_pending (NULL))
+    g_main_context_iteration (NULL, FALSE);
+
+  inTrackManualResize = NO;
+
   return YES;
 }
 
index 14c4d5a7aa99d4605f0ea2b86180dbe74c7e3043..37271790aad44ea9295fbc64b8e1e9c74e38cc17 100644 (file)
@@ -28,6 +28,7 @@
   /* Manually triggered move/resize (not by the window manager) */
   BOOL    inManualMove;
   BOOL    inManualResize;
+  BOOL    inTrackManualResize;
   NSPoint initialMoveLocation;
   NSPoint initialResizeLocation;
   NSRect  initialResizeFrame;